home *** CD-ROM | disk | FTP | other *** search
Text File | 1994-01-30 | 68.2 KB | 2,469 lines |
- *** gcc-2.5.0/c-lex.c Wed Sep 29 01:42:10 1993
- --- /net/acae127/home/bammi/usr2/gcc/c-lex.c Mon Nov 15 14:53:25 1993
- ***************
- *** 473,484 ****
- --- 473,486 ----
- case '\r':
- /* ANSI C says the effects of a carriage return in a source file
- are undefined. */
- + #ifndef atarist /* but not on an atarist, though hopefully we should'nt see it */
- if (pedantic && !newline_warning)
- {
- warning ("carriage return in source file");
- warning ("(we only warn about the first carriage return)");
- newline_warning = 1;
- }
- + #endif
- c = getc (finput);
- break;
-
- ***************
- *** 1432,1438 ****
- if (floatflag != NOT_FLOAT)
- {
- tree type = double_type_node;
- ! int garbage_chars = 0, exceeds_double = 0;
- int imag = 0;
- REAL_VALUE_TYPE value;
- jmp_buf handler;
- --- 1434,1440 ----
- if (floatflag != NOT_FLOAT)
- {
- tree type = double_type_node;
- ! int garbage_chars = 0;
- int imag = 0;
- REAL_VALUE_TYPE value;
- jmp_buf handler;
- ***************
- *** 1531,1572 ****
-
- type = float_type_node;
- value = REAL_VALUE_ATOF (copy, TYPE_MODE (type));
- - if (TARGET_FLOAT_FORMAT != IEEE_FLOAT_FORMAT
- - && REAL_VALUE_ISINF (value) && pedantic)
- - pedwarn ("floating point number exceeds range of `float'");
- }
- else if (lflag)
- {
- type = long_double_type_node;
- value = REAL_VALUE_ATOF (copy, TYPE_MODE (type));
- - if (TARGET_FLOAT_FORMAT != IEEE_FLOAT_FORMAT
- - && REAL_VALUE_ISINF (value) && pedantic)
- - pedwarn ("floating point number exceeds range of `long double'");
- }
- else
- {
- value = REAL_VALUE_ATOF (copy, TYPE_MODE (type));
- - if (TARGET_FLOAT_FORMAT != IEEE_FLOAT_FORMAT
- - && REAL_VALUE_ISINF (value) && pedantic)
- - pedwarn ("floating point number exceeds range of `double'");
- }
-
- set_float_handler (NULL_PTR);
- }
- #ifdef ERANGE
- ! if (errno == ERANGE && !flag_traditional && pedantic)
- {
- ! /* ERANGE is also reported for underflow,
- ! so test the value to distinguish overflow from that. */
- ! if (TARGET_FLOAT_FORMAT != IEEE_FLOAT_FORMAT
- ! && (REAL_VALUES_LESS (dconst1, value)
- ! || REAL_VALUES_LESS (value, dconstm1)))
- ! {
- ! pedwarn ("floating point number exceeds range of `double'");
- ! exceeds_double = 1;
- ! }
- }
- - #endif
- garbage_chars = 0;
- while (isalnum (c) || c == '.' || c == '_'
- || (!flag_traditional && (c == '+' || c == '-')
- --- 1533,1566 ----
-
- type = float_type_node;
- value = REAL_VALUE_ATOF (copy, TYPE_MODE (type));
- }
- else if (lflag)
- {
- type = long_double_type_node;
- value = REAL_VALUE_ATOF (copy, TYPE_MODE (type));
- }
- else
- {
- value = REAL_VALUE_ATOF (copy, TYPE_MODE (type));
- }
-
- set_float_handler (NULL_PTR);
- }
- + if (pedantic
- + && (REAL_VALUE_ISINF (value)
- #ifdef ERANGE
- ! || (TARGET_FLOAT_FORMAT != IEEE_FLOAT_FORMAT
- ! && errno == ERANGE
- ! /* ERANGE is also reported for underflow, so test the
- ! value to distinguish overflow from that. */
- ! && (REAL_VALUES_LESS (dconst1, value)
- ! || REAL_VALUES_LESS (value, dconstm1)))
- ! #endif
- ! ))
- {
- ! pedwarn ("floating point number exceeds range of `%s'",
- ! IDENTIFIER_POINTER (DECL_NAME (TYPE_NAME (type))));
- }
- garbage_chars = 0;
- while (isalnum (c) || c == '.' || c == '_'
- || (!flag_traditional && (c == '+' || c == '-')
- *** gcc-2.5.0/calls.c Mon Nov 15 11:07:51 1993
- --- /net/acae127/home/bammi/usr2/gcc/calls.c Mon Nov 15 14:48:42 1993
- ***************
- *** 2107,2112 ****
- --- 2107,2118 ----
-
- argvec = (struct arg *) alloca (nargs * sizeof (struct arg));
-
- + /* how would you do this RIGHT ?? fake a DECL node? dunno... */
- + #ifdef ENCODE_SECTION_INFO
- + /* mark it as a function (to be in the text section that is) */
- + SYMBOL_REF_FLAG (fun) = 1;
- + #endif
- +
- INIT_CUMULATIVE_ARGS (args_so_far, NULL_TREE, fun);
-
- args_size.constant = 0;
- ***************
- *** 2403,2408 ****
- --- 2409,2419 ----
- library functions shouldn't have many args. */
-
- argvec = (struct arg *) alloca ((nargs + 1) * sizeof (struct arg));
- +
- + #ifdef ENCODE_SECTION_INFO
- + /* mark it as a function (to be in the text section that is) */
- + SYMBOL_REF_FLAG (fun) = 1;
- + #endif
-
- INIT_CUMULATIVE_ARGS (args_so_far, NULL_TREE, fun);
-
- diff -rc gcc-2.5.0/cccp.c /net/acae127/home/bammi/usr2/gcc/cccp.c
- *** gcc-2.5.0/cccp.c Mon Nov 15 11:07:51 1993
- --- /net/acae127/home/bammi/usr2/gcc/cccp.c Mon Nov 15 14:58:06 1993
- ***************
- *** 77,82 ****
- --- 77,83 ----
- #include <stdio.h>
- #include <signal.h>
-
- + #ifndef atarist
- #ifndef VMS
- #ifndef USG
- #include <sys/time.h> /* for __DATE__ and __TIME__ */
- ***************
- *** 86,95 ****
- --- 87,110 ----
- #include <fcntl.h>
- #endif /* USG */
- #endif /* not VMS */
- + #endif /* not atarist */
-
- /* This defines "errno" properly for VMS, and gives us EACCES. */
- #include <errno.h>
-
- + /* atarist specific defs and includes */
- + #ifdef atarist
- + #include <time.h>
- + #include <file.h>
- + #include <string.h>
- + #include <stddef.h>
- +
- + long _stksize = -1L; /* want big stack cause include files
- + get alloca'ed there */
- +
- + #define read(fd,buf,size) _text_read(fd,buf,size)
- + #endif /* atarist */
- +
- /* VMS-specific definitions */
- #ifdef VMS
- #include <time.h>
- ***************
- *** 1073,1078 ****
- --- 1088,1099 ----
- /* Target-name to write with the dependency information. */
- char *deps_target = 0;
-
- + #ifdef atarist
- + #define GCC_INCLUDE_DIR "./"
- + /* turn this on if you are going to set the TOS 1.4 dont clear heap flag */
- + /* _malloczero(1); */ /* zero mallocs by default */
- + #endif
- +
- #ifdef RLIMIT_STACK
- /* Get rid of any avoidable limit on stack size. */
- {
- ***************
- *** 1395,1404 ****
- --- 1416,1431 ----
- break;
-
- case 'v':
- + #if (defined(atarist) || defined(CROSSATARI) || defined(atariminix))
- + #include "PatchLev.h"
- + fprintf (stderr, "GNU CPP-atariST version %s Patchlevel %s",
- + version_string, PatchLevel);
- + #else
- fprintf (stderr, "GNU CPP version %s", version_string);
- #ifdef TARGET_VERSION
- TARGET_VERSION;
- #endif
- + #endif
- fprintf (stderr, "\n");
- verbose = 1;
- break;
- ***************
- *** 1532,1537 ****
- --- 1559,1565 ----
- }
- }
-
- + #if (!(defined(atarist) || defined(CROSSATARI) || defined(atariminix)))
- /* Add dirs from CPATH after dirs from -I. */
- /* There seems to be confusion about what CPATH should do,
- so for the moment it is not documented. */
- ***************
- *** 1541,1546 ****
- --- 1569,1575 ----
- p = (char *) getenv ("CPATH");
- if (p != 0 && ! no_standard_includes)
- path_include (p);
- + #endif
-
- /* Now that dollars_in_ident is known, initialize is_idchar. */
- initialize_char_syntax ();
- ***************
- *** 1659,1666 ****
- { /* read the appropriate environment variable and if it exists
- replace include_defaults with the listed path. */
- char *epath = 0;
- switch ((objc << 1) + cplusplus)
- ! {
- case 0:
- epath = getenv ("C_INCLUDE_PATH");
- break;
- --- 1688,1743 ----
- { /* read the appropriate environment variable and if it exists
- replace include_defaults with the listed path. */
- char *epath = 0;
- + #if (defined(atarist) || defined(CROSSATARI) || defined(atariminix))
- + int db_hack = 0;
- + char *e1 = getenv("GNUINC"), *e2 = getenv("GNULIB"),
- + *e3 = getenv("GXXINC");
- +
- +
- + /* Get length of the alloc'ed array. (Yeah I know, I might alloc
- + * a character more than I need but who cares...
- + */
- + if (cplusplus && e3)
- + db_hack += strlen (e3);
- + if (e1)
- + db_hack += strlen (e1) + 1;
- + if (e2)
- + db_hack += strlen (e1) + 1;
- +
- + if (db_hack) {
- + epath = alloca (db_hack + 1);
- + *epath = '\0';
- + db_hack = 0;
- +
- + /* Concatenate the paths together. */
- + if (cplusplus && e3) {
- + strcpy (epath, e3);
- + db_hack = 1;
- + }
- + if (e1) {
- + if (db_hack) {
- + strcat (epath, PATH_SEP_STR);
- + }
- + strcat (epath, e1);
- + db_hack = 1;
- + }
- + if (e2) {
- + if (db_hack) {
- + strcat (epath, PATH_SEP_STR);
- + }
- + strcat (epath, e2);
- + }
- + }
- +
- + #ifdef atarist
- + if (epath)
- + for (e3=epath; *e3; e3++) /* Use one kind of path separator */
- + if (*e3 == ';')
- + *e3 = PATH_SEPARATOR;
- + #endif
- + #else
- switch ((objc << 1) + cplusplus)
- ! {
- case 0:
- epath = getenv ("C_INCLUDE_PATH");
- break;
- ***************
- *** 1673,1679 ****
- case 3:
- epath = getenv ("OBJCPLUS_INCLUDE_PATH");
- break;
- ! }
- /* If the environment var for this language is set,
- add to the default list of include directories. */
- if (epath) {
- --- 1750,1758 ----
- case 3:
- epath = getenv ("OBJCPLUS_INCLUDE_PATH");
- break;
- ! }
- ! #endif
- !
- /* If the environment var for this language is set,
- add to the default list of include directories. */
- if (epath) {
- ***************
- *** 1727,1739 ****
- --- 1806,1828 ----
- if (!no_standard_includes) {
- struct default_include *p = include_defaults;
- char *specd_prefix = include_prefix;
- + #ifdef GCC_INCLUDE_DIR
- char *default_prefix = savestring (GCC_INCLUDE_DIR);
- + #else
- + char *default_prefix = savestring ("./");
- + #endif
- int default_len = 0;
- /* Remove the `include' from /usr/local/lib/gcc.../include. */
- if (!strcmp (default_prefix + strlen (default_prefix) - 8, "/include")) {
- default_len = strlen (default_prefix) - 7;
- default_prefix[default_len] = 0;
- }
- + #ifdef atarist
- + else if (!strcmp (default_prefix + strlen (default_prefix) - 8, "\\include")) {
- + default_len = strlen (default_prefix) - 7;
- + default_prefix[default_len] = 0;
- + }
- + #endif
- /* Search "translated" versions of GNU directories.
- These have /usr/local/lib/gcc... replaced by specd_prefix. */
- if (specd_prefix != 0 && default_len != 0)
- ***************
- *** 1875,1881 ****
- --- 1964,1974 ----
- char *p1 = p;
- /* Discard all directory prefixes from P. */
- while (*p1) {
- + #ifdef atarist
- + if ((*p1 == '/') || (*p1 == '\\'))
- + #else
- if (*p1 == '/')
- + #endif
- p = p1 + 1;
- p1++;
- }
- ***************
- *** 2049,2054 ****
- --- 2142,2148 ----
- return 0;
- }
-
- + #if (!(defined(atarist) || defined(CROSSATARI) || defined(atariminix)))
- /* Given a colon-separated list of file names PATH,
- add all the names to the search path for include files. */
-
- ***************
- *** 2096,2101 ****
- --- 2190,2196 ----
- p++;
- }
- }
- + #endif /* atarist */
-
- /* Pre-C-Preprocessor to translate ANSI trigraph idiocy in BUF
- before main CCCP processing. Name `pcp' is also in honor of the
- ***************
- *** 3282,3287 ****
- --- 3377,3383 ----
- assertions_flag = save_assertions_flag;
- return obuf;
- }
- + /* #endif */
-
- /*
- * Process a # directive. Expects IP->bufp to point after the '#', as in
- ***************
- *** 3981,3987 ****
- --- 4077,4088 ----
- dsp[0].next = search_start;
- search_start = dsp;
- #ifndef VMS
- + #ifdef atarist
- + if((ep = rindex(nam, '\\')) == NULL)
- + ep = rindex(nam, '/');
- + #else
- ep = rindex (nam, '/');
- + #endif
- #else /* VMS */
- ep = rindex (nam, ']');
- if (ep == NULL) ep = rindex (nam, '>');
- ***************
- *** 4061,4069 ****
- --- 4162,4184 ----
-
- /* If specified file name is absolute, just open it. */
-
- + #ifdef atarist
- + if ((*fbeg == '\\') || (*fbeg == '/')) {
- + if(fbeg[2] == ':')
- + { /* allow "\D:\xxx" */
- + strncpy (fname, fbeg+1, flen-1);
- + fname[flen-1] = 0;
- + }
- + else
- + { /* allow "\lib\xxx" == "\currentdrive:\lib\xxx" */
- + strncpy (fname, fbeg, flen);
- + fname[flen] = 0;
- + }
- + #else
- if (*fbeg == '/') {
- strncpy (fname, fbeg, flen);
- fname[flen] = 0;
- + #endif
- if (redundant_include_p (fname))
- return 0;
- if (importing)
- ***************
- *** 4084,4090 ****
- --- 4199,4209 ----
- if (searchptr->fname[0] == 0)
- continue;
- strcpy (fname, searchptr->fname);
- + #ifdef atarist
- + strcat (fname, "\\");
- + #else
- strcat (fname, "/");
- + #endif
- fname[strlen (fname) + flen] = 0;
- } else {
- fname[0] = 0;
- ***************
- *** 4197,4213 ****
-
- if (!no_precomp)
- do {
- sprintf (pcftry, "%s%d", fname, pcfnum++);
-
- pcf = open (pcftry, O_RDONLY, 0666);
- if (pcf != -1)
- {
- struct stat s;
-
- fstat (pcf, &s);
- if (bcmp (&stat_f.st_ino, &s.st_ino, sizeof (s.st_ino))
- || stat_f.st_dev != s.st_dev)
- ! {
- pcfbuf = check_precompiled (pcf, fname, &pcfbuflimit);
- /* Don't need it any more. */
- close (pcf);
- --- 4316,4374 ----
-
- if (!no_precomp)
- do {
- + #ifdef atarist
- + int numlen;
- + char *dot;
- + char *slash;
- +
- + /* cut extension to 3 chars and dont depend on UNIXMODE */
- + /* this will have to be done when saving precompiled headers, too */
- + /* but as far as I tried, they dont work up to now, anyway (AL) */
- +
- + if( pcfnum>=100 ) numlen=3;
- + else if( pcfnum>=10 ) numlen=2;
- + else numlen=1;
- +
- + dot=strrchr( fname, '.' );
- + if( (slash=strrchr( fname, '/')) && slash>dot )
- + dot=NULL;
- + else
- + if( (slash=strrchr( fname, '\\')) && slash>dot )
- + dot=NULL;
- +
- + if( dot ) {
- + if( strlen(dot)-1>3-numlen ) {
- + sprintf(pcftry, "%.*s%d", strlen(fname)-(strlen(dot)-(4-numlen)),
- + fname, pcfnum++);
- + } else {
- + sprintf(pcftry, "%s%d", fname, pcfnum++);
- + }
- + } else {
- + sprintf( pcftry, "%s.%d", fname, pcfnum++);
- + }
- + #else /* looks like we got a sane filesystem */
- sprintf (pcftry, "%s%d", fname, pcfnum++);
- + #endif
- + #if 0
- + fprintf ( stderr, "trying precompiled file %s.\n", pcftry );
- + #endif
-
- pcf = open (pcftry, O_RDONLY, 0666);
- if (pcf != -1)
- {
- + #ifndef atarist
- + /* dont bother with this on the ST since these field are faked
- + * anyways
- + */
- struct stat s;
-
- fstat (pcf, &s);
- if (bcmp (&stat_f.st_ino, &s.st_ino, sizeof (s.st_ino))
- || stat_f.st_dev != s.st_dev)
- ! #else
- ! if (1)
- ! #endif
- ! {
- pcfbuf = check_precompiled (pcf, fname, &pcfbuflimit);
- /* Don't need it any more. */
- close (pcf);
- ***************
- *** 6210,6216 ****
- free (trybuf.buf);
-
- /* Output directive name. */
- ! check_expand (op, 8);
- bcopy ("#ident ", op->bufp, 7);
- op->bufp += 7;
-
- --- 6371,6377 ----
- free (trybuf.buf);
-
- /* Output directive name. */
- ! check_expand (op, 7);
- bcopy ("#ident ", op->bufp, 7);
- op->bufp += 7;
-
- ***************
- *** 8956,8961 ****
- --- 9117,9123 ----
- deps_buffer[deps_size] = 0;
- }
-
- + #if (!(defined(atarist) || defined(atariminix)))
- #if defined(USG) || defined(VMS)
- #ifndef BSTRING
-
- ***************
- *** 8992,8998 ****
- }
- #endif /* not BSTRING */
- #endif /* USG or VMS */
- !
-
- static void
- fatal (str, arg)
- --- 9154,9160 ----
- }
- #endif /* not BSTRING */
- #endif /* USG or VMS */
- ! #endif /* any atari */
-
- static void
- fatal (str, arg)
- *** gcc-2.5.0/config/m68k/m68k.c Mon Nov 15 11:07:54 1993
- --- /net/acae127/home/bammi/usr2/gcc/config/m68k/m68k.c Mon Nov 15 14:48:56 1993
- ***************
- *** 61,67 ****
- void
- finalize_pic ()
- {
- ! if (flag_pic && current_function_uses_pic_offset_table)
- emit_insn (gen_rtx (USE, VOIDmode, pic_offset_table_rtx));
- }
-
- --- 61,67 ----
- void
- finalize_pic ()
- {
- ! if (flag_pic && flag_pic < 3 && current_function_uses_pic_offset_table)
- emit_insn (gen_rtx (USE, VOIDmode, pic_offset_table_rtx));
- }
-
- ***************
- *** 214,220 ****
- asm_fprintf (stream, "\tmoveml %0I0x%x,%Rsp@-\n", mask);
- #endif
- }
- ! if (flag_pic && current_function_uses_pic_offset_table)
- {
- #ifdef MOTOROLA
- asm_fprintf (stream, "\t%Olea (%Rpc, %U_GLOBAL_OFFSET_TABLE_@GOTPC), %s\n",
- --- 214,220 ----
- asm_fprintf (stream, "\tmoveml %0I0x%x,%Rsp@-\n", mask);
- #endif
- }
- ! if (flag_pic && flag_pic < 3 && current_function_uses_pic_offset_table)
- {
- #ifdef MOTOROLA
- asm_fprintf (stream, "\t%Olea (%Rpc, %U_GLOBAL_OFFSET_TABLE_@GOTPC), %s\n",
- ***************
- *** 801,812 ****
- /* First handle a simple SYMBOL_REF or LABEL_REF */
- if (GET_CODE (orig) == SYMBOL_REF || GET_CODE (orig) == LABEL_REF)
- {
- if (reg == 0)
- abort ();
-
- ! pic_ref = gen_rtx (MEM, Pmode,
- ! gen_rtx (PLUS, Pmode,
- ! pic_offset_table_rtx, orig));
- current_function_uses_pic_offset_table = 1;
- RTX_UNCHANGING_P (pic_ref) = 1;
- emit_move_insn (reg, pic_ref);
- --- 801,820 ----
- /* First handle a simple SYMBOL_REF or LABEL_REF */
- if (GET_CODE (orig) == SYMBOL_REF || GET_CODE (orig) == LABEL_REF)
- {
- + #ifdef LEGITIMATE_BASEREL_OPERAND_P
- + if (LEGITIMATE_BASEREL_OPERAND_P (orig))
- + return orig;
- + #endif
- +
- if (reg == 0)
- abort ();
-
- ! if (flag_pic == 3)
- ! pic_ref = gen_rtx (PLUS, Pmode, pic_offset_table_rtx, orig);
- ! else
- ! pic_ref = gen_rtx (MEM, Pmode,
- ! gen_rtx (PLUS, Pmode,
- ! pic_offset_table_rtx, orig));
- current_function_uses_pic_offset_table = 1;
- RTX_UNCHANGING_P (pic_ref) = 1;
- emit_move_insn (reg, pic_ref);
- ***************
- *** 1859,1864 ****
- --- 1867,1875 ----
- output_address (XEXP (op, 0));
- if (letter == 'd' && ! TARGET_68020
- && CONSTANT_ADDRESS_P (XEXP (op, 0))
- + && !(TARGET_PC_REL && GET_CODE (XEXP (op, 0)) == SYMBOL_REF
- + && SYMBOL_REF_FLAG (XEXP (op, 0))
- + && !SYMBOL_REF_USED (XEXP (op, 0)))
- && !(GET_CODE (XEXP (op, 0)) == CONST_INT
- && INTVAL (XEXP (op, 0)) < 0x8000
- && INTVAL (XEXP (op, 0)) >= -0x8000))
- ***************
- *** 2166,2171 ****
- --- 2177,2184 ----
- fprintf (file, ":w");
- if ((flag_pic == 2) && (breg == pic_offset_table_rtx))
- fprintf (file, ":l");
- + if ((flag_pic == 3) && (breg == pic_offset_table_rtx))
- + fprintf (file, ":w");
- }
- if (addr != 0 && ireg != 0)
- {
- ***************
- *** 2243,2248 ****
- --- 2256,2273 ----
- fprintf (file, "%d:w", INTVAL (addr));
- #endif
- }
- + else if (TARGET_PC_REL && GET_CODE (addr) == SYMBOL_REF
- + && SYMBOL_REF_FLAG (addr) && !SYMBOL_REF_USED (addr))
- + {
- + #ifdef MOTOROLA
- + output_addr_const (file, addr);
- + fputs ("(pc)", file);
- + #else
- + fputs ("pc@(", file);
- + output_addr_const (file, addr);
- + putc (')', file);
- + #endif
- + }
- else
- {
- output_addr_const (file, addr);
- ***************
- *** 2309,2311 ****
- --- 2334,2352 ----
-
- return 0;
- }
- +
- + #ifdef ENCODE_SECTION_INFO
- + /* Does operand (which is a symbolic_operand) live in text space? If
- + so SYMBOL_REF_FLAG, which is set by ENCODE_SECTION_INFO, will be true.*/
- +
- + int
- + read_only_operand (operand)
- + rtx operand;
- + {
- + if (GET_CODE (operand) == CONST)
- + operand = XEXP (XEXP (operand, 0), 0);
- + if (GET_CODE (operand) == SYMBOL_REF)
- + return SYMBOL_REF_FLAG (operand) || CONSTANT_POOL_ADDRESS_P (operand);
- + return 1;
- + }
- + #endif
- *** gcc-2.5.0/config/m68k/m68k.h Mon Nov 15 11:07:54 1993
- --- /net/acae127/home/bammi/usr2/gcc/config/m68k/m68k.h Mon Nov 15 14:48:57 1993
- ***************
- *** 92,97 ****
- --- 92,103 ----
- /* Use the 68040-only fp instructions (-m68040). */
- #define TARGET_68040_ONLY (target_flags & 01000)
-
- + /* Use PC-relative addressing for refs to read-only data */
- + #define TARGET_PC_REL (target_flags & 02000)
- +
- + /* Use base-relative addressing for refs to data&bss segments */
- + #define TARGET_BASE_REL (target_flags & 04000)
- +
- /* Macro to define tables used to set the flags.
- This is a list in braces of pairs in braces,
- each pair being { "NAME", VALUE }
- ***************
- *** 121,126 ****
- --- 127,136 ----
- { "68030", -01400}, \
- { "68030", 5}, \
- { "68040", 01007}, \
- + { "pcrel", 02000}, \
- + { "nopcrel", -02000}, \
- + { "baserel", 04000}, \
- + { "nobaserel", -04000}, \
- { "68851", 0}, /* Affects *_SPEC and/or GAS. */ \
- { "no-68851", 0}, /* Affects *_SPEC and/or GAS. */ \
- { "68302", 0}, /* Affects *_SPEC and/or GAS. */ \
- ***************
- *** 143,154 ****
- --- 153,166 ----
- if (! TARGET_68020 && flag_pic == 2) \
- error("-fPIC is not currently supported on the 68000 or 68010\n"); \
- SUBTARGET_OVERRIDE_OPTIONS \
- + if (TARGET_BASE_REL) flag_pic = 3; \
- }
- #else
- #define OVERRIDE_OPTIONS \
- { \
- if (! TARGET_68020 && flag_pic == 2) \
- error("-fPIC is not currently supported on the 68000 or 68010\n"); \
- + if (TARGET_BASE_REL) flag_pic = 3; \
- SUBTARGET_OVERRIDE_OPTIONS \
- }
- #endif /* defined SUPPORT_SUN_FPA */
- ***************
- *** 356,361 ****
- --- 368,376 ----
- { \
- if (flag_pic) \
- fixed_regs[PIC_OFFSET_TABLE_REGNUM] = 1; \
- + /* prevent saving/restoring of the base reg */ \
- + if (flag_pic == 3) \
- + call_used_regs[PIC_OFFSET_TABLE_REGNUM] = 1; \
- }
-
- #else /* defined SUPPORT_SUN_FPA */
- ***************
- *** 380,385 ****
- --- 395,403 ----
- } \
- if (flag_pic) \
- fixed_regs[PIC_OFFSET_TABLE_REGNUM] = 1; \
- + /* prevent saving/restoring of the base reg */ \
- + if (flag_pic == 3) \
- + call_used_regs[PIC_OFFSET_TABLE_REGNUM] = 1; \
- }
-
- #endif /* defined SUPPORT_SUN_FPA */
- ***************
- *** 1155,1160 ****
- --- 1173,1180 ----
- && GET_CODE (XEXP (X, 1)) == CONST_INT \
- && ((unsigned) INTVAL (XEXP (X, 1)) + 0x8000) < 0x10000) \
- || (GET_CODE (X) == PLUS && XEXP (X, 0) == pic_offset_table_rtx \
- + && flag_pic == 3 && CONSTANT_ADDRESS_P (XEXP (X, 1))) \
- + || (GET_CODE (X) == PLUS && XEXP (X, 0) == pic_offset_table_rtx \
- && flag_pic && GET_CODE (XEXP (X, 1)) == SYMBOL_REF) \
- || (GET_CODE (X) == PLUS && XEXP (X, 0) == pic_offset_table_rtx \
- && flag_pic && GET_CODE (XEXP (X, 1)) == LABEL_REF)) \
- ***************
- *** 1221,1227 ****
- #define GO_IF_LEGITIMATE_ADDRESS(MODE, X, ADDR) \
- { GO_IF_NONINDEXED_ADDRESS (X, ADDR); \
- GO_IF_INDEXED_ADDRESS (X, ADDR); \
- ! if (flag_pic && MODE == CASE_VECTOR_MODE && GET_CODE (X) == PLUS \
- && LEGITIMATE_INDEX_P (XEXP (X, 0)) \
- && GET_CODE (XEXP (X, 1)) == LABEL_REF) \
- goto ADDR; }
- --- 1241,1247 ----
- #define GO_IF_LEGITIMATE_ADDRESS(MODE, X, ADDR) \
- { GO_IF_NONINDEXED_ADDRESS (X, ADDR); \
- GO_IF_INDEXED_ADDRESS (X, ADDR); \
- ! if ((flag_pic && flag_pic < 3) && MODE == CASE_VECTOR_MODE && GET_CODE (X) == PLUS \
- && LEGITIMATE_INDEX_P (XEXP (X, 0)) \
- && GET_CODE (XEXP (X, 1)) == LABEL_REF) \
- goto ADDR; }
- *** gcc-2.5.0/config/m68k/m68k.md Sun Nov 28 21:58:14 1993
- --- /net/acae127/home/bammi/usr2/gcc/config/m68k/m68k.md Sun Nov 28 21:51:24 1993
- ***************
- *** 716,728 ****
- {
- if (flag_pic && symbolic_operand (operands[1], SImode))
- {
- ! /* The source is an address which requires PIC relocation.
- ! Call legitimize_pic_address with the source, mode, and a relocation
- ! register (a new pseudo, or the final destination if reload_in_progress
- ! is set). Then fall through normally */
- ! extern rtx legitimize_pic_address();
- ! rtx temp = reload_in_progress ? operands[0] : gen_reg_rtx (Pmode);
- ! operands[1] = legitimize_pic_address (operands[1], SImode, temp);
- }
- }")
-
- --- 716,733 ----
- {
- if (flag_pic && symbolic_operand (operands[1], SImode))
- {
- ! #ifdef LEGITIMATE_BASEREL_OPERAND_P
- ! if (flag_pic != 3 || !LEGITIMATE_BASEREL_OPERAND_P (operands[1]))
- ! #endif
- ! {
- ! /* The source is an address which requires PIC relocation.
- ! Call legitimize_pic_address with the source, mode, and a relocation
- ! register (a new pseudo, or the final destination if reload_in_progress
- ! is set). Then fall through normally */
- ! extern rtx legitimize_pic_address();
- ! rtx temp = reload_in_progress ? operands[0] : gen_reg_rtx (Pmode);
- ! operands[1] = legitimize_pic_address (operands[1], SImode, temp);
- ! }
- }
- }")
-
- ***************
- *** 4858,4864 ****
- ""
- "
- {
- ! if (flag_pic && GET_CODE (XEXP (operands[0], 0)) == SYMBOL_REF)
- #ifdef MOTOROLA
- SYMBOL_REF_FLAG (XEXP (operands[0], 0)) = 1;
- #else
- --- 4863,4869 ----
- ""
- "
- {
- ! if (flag_pic && flag_pic < 3 && GET_CODE (XEXP (operands[0], 0)) == SYMBOL_REF)
- #ifdef MOTOROLA
- SYMBOL_REF_FLAG (XEXP (operands[0], 0)) = 1;
- #else
- ***************
- *** 4873,4879 ****
- (match_operand:SI 1 "general_operand" "g"))]
- ;; Operand 1 not really used on the m68000.
-
- ! "! flag_pic"
- "*
- #ifdef MOTOROLA
- return \"jsr %0\";
- --- 4878,4884 ----
- (match_operand:SI 1 "general_operand" "g"))]
- ;; Operand 1 not really used on the m68000.
-
- ! "(! flag_pic || flag_pic == 3)"
- "*
- #ifdef MOTOROLA
- return \"jsr %0\";
- ***************
- *** 4888,4894 ****
- (match_operand:SI 1 "general_operand" "g"))]
- ;; Operand 1 not really used on the m68000.
-
- ! "flag_pic"
- "*
- #ifdef HPUX_ASM
- return \"bsr %0\";
- --- 4893,4899 ----
- (match_operand:SI 1 "general_operand" "g"))]
- ;; Operand 1 not really used on the m68000.
-
- ! "(flag_pic && flag_pic < 3)"
- "*
- #ifdef HPUX_ASM
- return \"bsr %0\";
- ***************
- *** 4913,4919 ****
- ""
- "
- {
- ! if (flag_pic && GET_CODE (XEXP (operands[1], 0)) == SYMBOL_REF)
- #ifdef MOTOROLA
- SYMBOL_REF_FLAG (XEXP (operands[1], 0)) = 1;
- #else
- --- 4918,4924 ----
- ""
- "
- {
- ! if (flag_pic && flag_pic < 3 && GET_CODE (XEXP (operands[1], 0)) == SYMBOL_REF)
- #ifdef MOTOROLA
- SYMBOL_REF_FLAG (XEXP (operands[1], 0)) = 1;
- #else
- ***************
- *** 4928,4934 ****
- (call (match_operand:QI 1 "memory_operand" "o")
- (match_operand:SI 2 "general_operand" "g")))]
- ;; Operand 2 not really used on the m68000.
- ! "! flag_pic"
- "*
- #ifdef MOTOROLA
- return \"jsr %1\";
- --- 4933,4939 ----
- (call (match_operand:QI 1 "memory_operand" "o")
- (match_operand:SI 2 "general_operand" "g")))]
- ;; Operand 2 not really used on the m68000.
- ! "(! flag_pic || flag_pic == 3)"
- "*
- #ifdef MOTOROLA
- return \"jsr %1\";
- ***************
- *** 4943,4949 ****
- (call (match_operand:QI 1 "memory_operand" "o")
- (match_operand:SI 2 "general_operand" "g")))]
- ;; Operand 2 not really used on the m68000.
- ! "flag_pic"
- "*
- #ifdef HPUX_ASM
- return \"bsr %1\";
- --- 4948,4954 ----
- (call (match_operand:QI 1 "memory_operand" "o")
- (match_operand:SI 2 "general_operand" "g")))]
- ;; Operand 2 not really used on the m68000.
- ! "(flag_pic && flag_pic < 3)"
- "*
- #ifdef HPUX_ASM
- return \"bsr %1\";
- diff -rc gcc-2.5.0/cp-cvt.c /net/acae127/home/bammi/usr2/gcc/cp-cvt.c
- *** gcc-2.5.0/cp-cvt.c Sun Nov 28 21:58:19 1993
- --- /net/acae127/home/bammi/usr2/gcc/cp-cvt.c Sun Nov 28 21:51:30 1993
- ***************
- *** 264,269 ****
- --- 264,272 ----
- return error_mark_node;
- if (binfo == NULL_TREE)
- return error_not_base_type (target_type, argtype);
- + if (binfo == 0) {
- + return error_mark_node;
- + } else
- basetype = BINFO_TYPE (binfo);
- }
-
- *** gcc-2.5.0/cp-lex.c Sun Nov 28 21:58:25 1993
- --- /net/acae127/home/bammi/usr2/gcc/cp-lex.c Sun Nov 28 21:51:42 1993
- ***************
- *** 3473,3479 ****
- tree type = double_type_node;
- char f_seen = 0;
- char l_seen = 0;
- ! int garbage_chars = 0, exceeds_double = 0;
- REAL_VALUE_TYPE value;
- jmp_buf handler;
-
- --- 3473,3479 ----
- tree type = double_type_node;
- char f_seen = 0;
- char l_seen = 0;
- ! int garbage_chars = 0;
- REAL_VALUE_TYPE value;
- jmp_buf handler;
-
- ***************
- *** 3523,3581 ****
- case 'f': case 'F':
- type = float_type_node;
- value = REAL_VALUE_ATOF (token_buffer, TYPE_MODE (type));
- - if (TARGET_FLOAT_FORMAT != IEEE_FLOAT_FORMAT
- - && REAL_VALUE_ISINF (value) && pedantic)
- - pedwarn ("floating point number exceeds range of `float'");
- garbage_chars = -1;
- break;
-
- case 'l': case 'L':
- type = long_double_type_node;
- value = REAL_VALUE_ATOF (token_buffer, TYPE_MODE (type));
- - if (TARGET_FLOAT_FORMAT != IEEE_FLOAT_FORMAT
- - && REAL_VALUE_ISINF (value) && pedantic)
- - pedwarn (
- - "floating point number exceeds range of `long double'");
- garbage_chars = -1;
- break;
-
- default:
- value = REAL_VALUE_ATOF (token_buffer, TYPE_MODE (type));
- - if (TARGET_FLOAT_FORMAT != IEEE_FLOAT_FORMAT
- - && REAL_VALUE_ISINF (value) && pedantic)
- - pedwarn ("floating point number exceeds range of `double'");
- }
- ! set_float_handler (NULL);
- }
- #ifdef ERANGE
- ! if (errno == ERANGE && !flag_traditional && pedantic)
- {
- ! char *p1 = token_buffer;
- ! /* Check for "0.0" and variants;
- ! SunOS 4 spuriously returns ERANGE for them. */
- ! while (*p1 == '0') p1++;
- ! if (*p1 == '.')
- ! {
- ! p1++;
- ! while (*p1 == '0') p1++;
- ! }
- ! if (*p1 == 'e' || *p1 == 'E')
- ! {
- ! /* with significand==0, ignore the exponent */
- ! p1++;
- ! while (*p1 != 0) p1++;
- ! }
- ! /* ERANGE is also reported for underflow,
- ! so test the value to distinguish overflow from that. */
- ! if (TARGET_FLOAT_FORMAT != IEEE_FLOAT_FORMAT
- ! && (REAL_VALUES_LESS (dconst1, value)
- ! || REAL_VALUES_LESS (value, dconstm1)))
- ! {
- ! pedwarn ("floating point number exceeds range of `double'");
- ! exceeds_double = 1;
- ! }
- }
- - #endif
- /* Note: garbage_chars is -1 if first char is *not* garbage. */
- while (isalnum (c))
- {
- --- 3523,3557 ----
- case 'f': case 'F':
- type = float_type_node;
- value = REAL_VALUE_ATOF (token_buffer, TYPE_MODE (type));
- garbage_chars = -1;
- break;
-
- case 'l': case 'L':
- type = long_double_type_node;
- value = REAL_VALUE_ATOF (token_buffer, TYPE_MODE (type));
- garbage_chars = -1;
- break;
-
- default:
- value = REAL_VALUE_ATOF (token_buffer, TYPE_MODE (type));
- }
- ! set_float_handler (NULL_PTR);
- }
- + if (pedantic
- + && (REAL_VALUE_ISINF (value)
- #ifdef ERANGE
- ! || (TARGET_FLOAT_FORMAT != IEEE_FLOAT_FORMAT
- ! && errno == ERANGE
- ! /* ERANGE is also reported for underflow, so test the
- ! value to distinguish overflow from that. */
- ! && (REAL_VALUES_LESS (dconst1, value)
- ! || REAL_VALUES_LESS (value, dconstm1)))
- ! #endif
- ! ))
- {
- ! pedwarn ("floating point number exceeds range of `%s'",
- ! IDENTIFIER_POINTER (DECL_NAME (TYPE_NAME (type))));
- }
- /* Note: garbage_chars is -1 if first char is *not* garbage. */
- while (isalnum (c))
- {
- *** gcc-2.5.0/cp-parse.y Sun Nov 28 21:58:27 1993
- --- /net/acae127/home/bammi/usr2/gcc/cp-parse.y Sun Nov 28 21:58:36 1993
- ***************
- *** 1127,1134 ****
- else if (TREE_CODE ($2) == TREE_LIST)
- {
- tree t = TREE_VALUE ($2);
- ! if (t != NULL_TREE
- ! && TREE_CODE (TREE_TYPE (t)) == FUNCTION_TYPE)
- pedwarn ("ANSI C++ forbids using sizeof() on a function");
- }
- $$ = c_sizeof (TREE_TYPE ($2)); }
- --- 1127,1134 ----
- else if (TREE_CODE ($2) == TREE_LIST)
- {
- tree t = TREE_VALUE ($2);
- ! if (t != NULL_TREE &&
- ! ((TREE_TYPE( t) == 0) || TREE_CODE (TREE_TYPE (t)) == FUNCTION_TYPE))
- pedwarn ("ANSI C++ forbids using sizeof() on a function");
- }
- $$ = c_sizeof (TREE_TYPE ($2)); }
- ***************
- *** 1919,1924 ****
- --- 1919,1935 ----
- warning ("`%s' attribute directive ignored",
- IDENTIFIER_POINTER ($1));
- $$ = $1; }
- + | TYPE_QUAL
- + | IDENTIFIER '(' IDENTIFIER ')'
- + { /* If not "mode (m)", then issue warning. */
- + if (strcmp (IDENTIFIER_POINTER ($1), "mode") != 0)
- + {
- + warning ("`%s' attribute directive ignored",
- + IDENTIFIER_POINTER ($1));
- + $$ = $1;
- + }
- + else
- + $$ = tree_cons ($1, $3, NULL_TREE); }
- | IDENTIFIER '(' CONSTANT ')'
- { /* if not "aligned(n)", then issue warning */
- if (strcmp (IDENTIFIER_POINTER ($1), "aligned") != 0
- diff -rc gcc-2.5.0/cp-tree.c /net/acae127/home/bammi/usr2/gcc/cp-tree.c
- *** gcc-2.5.0/cp-tree.c Sun Nov 28 21:58:29 1993
- --- /net/acae127/home/bammi/usr2/gcc/cp-tree.c Sun Nov 28 21:51:47 1993
- ***************
- *** 1672,1677 ****
- --- 1672,1678 ----
- print_class_statistics ();
- }
-
- + #ifndef atarist
- /* This is used by the `assert' macro. It is provided in libgcc.a,
- which `cc' doesn't know how to link. Note that the C++ front-end
- no longer actually uses the `assert' macro (instead, it calls
- ***************
- *** 1694,1699 ****
- --- 1695,1701 ----
- fflush (stderr);
- abort ();
- }
- + #endif
-
- /* Return, as an INTEGER_CST node, the number of elements for
- TYPE (which is an ARRAY_TYPE). This counts only elements of the top array. */
- *** gcc-2.5.0/dbxout.c Fri Nov 19 09:35:58 1993
- --- /net/acae127/home/bammi/usr2/gcc/dbxout.c Fri Nov 19 09:44:38 1993
- ***************
- *** 471,476 ****
- --- 471,482 ----
- and output them all, except for those already output. */
-
- dbxout_typedefs (syms);
- +
- + /* Make sure that gdb extensions, if desired, are used immediately for C++. */
- +
- + if (use_gnu_debug_info_extensions
- + && strcmp (lang_identify (), "cplusplus") == 0)
- + have_used_extensions = 1;
- }
-
- /* Output any typedef names for types described by TYPE_DECLs in SYMS,
- *** gcc-2.5.0/gcc.c Sun Nov 28 21:58:40 1993
- --- /net/acae127/home/bammi/usr2/gcc/gcc.c Sun Nov 28 21:52:04 1993
- ***************
- *** 30,35 ****
- --- 30,44 ----
- Once it knows which kind of compilation to perform, the procedure for
- compilation is specified by a string called a "spec". */
-
- + #ifdef CROSSATARI
- + #ifdef atarist
- + #undef atarist
- + #endif
- + #ifdef atariminix
- + #undef atariminix
- + #endif
- + #endif
- +
- #include <sys/types.h>
- #include <ctype.h>
- #include <signal.h>
- ***************
- *** 40,45 ****
- --- 49,56 ----
- #include "obstack.h"
- #include "gvarargs.h"
- #include <stdio.h>
- + #include <string.h>
- + /* if your supplier still does'nt have string.h, shoot him.. */
-
- #ifndef R_OK
- #define R_OK 4
- ***************
- *** 65,71 ****
- #define NULL_PTR ((GENERIC_PTR)0)
- #endif
-
- ! #ifdef USG
- #define vfork fork
- #endif /* USG */
-
- --- 76,82 ----
- #define NULL_PTR ((GENERIC_PTR)0)
- #endif
-
- ! #if (defined(USG) || defined(atariminix))
- #define vfork fork
- #endif /* USG */
-
- ***************
- *** 97,102 ****
- --- 108,124 ----
- #define PATH_SEPARATOR ':'
- #endif
-
- + #ifdef CROSSATARI
- + #include <ctype.h>
- + #endif
- +
- + #ifdef atarist
- + #include <osbind.h>
- + #include <ctype.h>
- + #include <fcntl.h> /* fgth, for redirection of stderr */
- + long _stksize = 8192;
- + #endif
- +
- #define obstack_chunk_alloc xmalloc
- #define obstack_chunk_free free
-
- ***************
- *** 161,167 ****
- --- 183,191 ----
- pass the compiler in building the list of pointers to constructors
- and destructors. */
-
- + #if (!(defined(CROSSATARI) || defined(atarist)))
- static struct obstack collect_obstack;
- + #endif
-
- extern char *version_string;
-
- ***************
- *** 462,468 ****
- %{aux-info*}\
- %{pg:%{fomit-frame-pointer:%e-pg and -fomit-frame-pointer are incompatible}}\
- %{S:%W{o*}%{!o*:-o %b.s}}%{!S:-o %{|!pipe:%g.s}} |\n\
- ! %{!S:as %{R} %{j} %{J} %{h} %{d2} %a %Y\
- %{c:%W{o*}%{!o*:-o %w%b.o}}%{!c:-o %d%w%u.o}\
- %{!pipe:%g.s} %A\n }}}}"},
- {"-",
- --- 486,492 ----
- %{aux-info*}\
- %{pg:%{fomit-frame-pointer:%e-pg and -fomit-frame-pointer are incompatible}}\
- %{S:%W{o*}%{!o*:-o %b.s}}%{!S:-o %{|!pipe:%g.s}} |\n\
- ! %{!S:as %{v} %{R} %{j} %{J} %{h} %{d2} %a %Y\
- %{c:%W{o*}%{!o*:-o %w%b.o}}%{!c:-o %d%w%u.o}\
- %{!pipe:%g.s} %A\n }}}}"},
- {"-",
- ***************
- *** 497,503 ****
- %{aux-info*}\
- %{pg:%{fomit-frame-pointer:%e-pg and -fomit-frame-pointer are incompatible}}\
- %{S:%W{o*}%{!o*:-o %b.s}}%{!S:-o %{|!pipe:%g.s}} |\n\
- ! %{!S:as %{R} %{j} %{J} %{h} %{d2} %a %Y\
- %{c:%W{o*}%{!o*:-o %w%b.o}}%{!c:-o %d%w%u.o}\
- %{!pipe:%g.s} %A\n }}}}"},
- {".h", "@c-header"},
- --- 521,527 ----
- %{aux-info*}\
- %{pg:%{fomit-frame-pointer:%e-pg and -fomit-frame-pointer are incompatible}}\
- %{S:%W{o*}%{!o*:-o %b.s}}%{!S:-o %{|!pipe:%g.s}} |\n\
- ! %{!S:as %{v} %{R} %{j} %{J} %{h} %{d2} %a %Y\
- %{c:%W{o*}%{!o*:-o %w%b.o}}%{!c:-o %d%w%u.o}\
- %{!pipe:%g.s} %A\n }}}}"},
- {".h", "@c-header"},
- ***************
- *** 533,539 ****
- %{aux-info*}\
- %{pg:%{fomit-frame-pointer:%e-pg and -fomit-frame-pointer are incompatible}}\
- %{S:%W{o*}%{!o*:-o %b.s}}%{!S:-o %{|!pipe:%g.s}} |\n\
- ! %{!S:as %{R} %{j} %{J} %{h} %{d2} %a %Y\
- %{c:%W{o*}%{!o*:-o %w%b.o}}%{!c:-o %d%w%u.o}\
- %{!pipe:%g.s} %A\n }}}}"},
- {".i", "@cpp-output"},
- --- 557,563 ----
- %{aux-info*}\
- %{pg:%{fomit-frame-pointer:%e-pg and -fomit-frame-pointer are incompatible}}\
- %{S:%W{o*}%{!o*:-o %b.s}}%{!S:-o %{|!pipe:%g.s}} |\n\
- ! %{!S:as %{v} %{R} %{j} %{J} %{h} %{d2} %a %Y\
- %{c:%W{o*}%{!o*:-o %w%b.o}}%{!c:-o %d%w%u.o}\
- %{!pipe:%g.s} %A\n }}}}"},
- {".i", "@cpp-output"},
- ***************
- *** 544,550 ****
- %{aux-info*}\
- %{pg:%{fomit-frame-pointer:%e-pg and -fomit-frame-pointer are incompatible}}\
- %{S:%W{o*}%{!o*:-o %b.s}}%{!S:-o %{|!pipe:%g.s}} |\n\
- ! %{!S:as %{R} %{j} %{J} %{h} %{d2} %a %Y\
- %{c:%W{o*}%{!o*:-o %w%b.o}}%{!c:-o %d%w%u.o} %{!pipe:%g.s} %A\n }"},
- {".ii", "@c++-cpp-output"},
- {"@c++-cpp-output",
- --- 568,574 ----
- %{aux-info*}\
- %{pg:%{fomit-frame-pointer:%e-pg and -fomit-frame-pointer are incompatible}}\
- %{S:%W{o*}%{!o*:-o %b.s}}%{!S:-o %{|!pipe:%g.s}} |\n\
- ! %{!S:as %{v} %{R} %{j} %{J} %{h} %{d2} %a %Y\
- %{c:%W{o*}%{!o*:-o %w%b.o}}%{!c:-o %d%w%u.o} %{!pipe:%g.s} %A\n }"},
- {".ii", "@c++-cpp-output"},
- {"@c++-cpp-output",
- ***************
- *** 554,567 ****
- %{aux-info*}\
- %{pg:%{fomit-frame-pointer:%e-pg and -fomit-frame-pointer are incompatible}}\
- %{S:%W{o*}%{!o*:-o %b.s}}%{!S:-o %{|!pipe:%g.s}} |\n\
- ! %{!S:as %{R} %{j} %{J} %{h} %{d2} %a %Y\
- %{c:%W{o*}%{!o*:-o %w%b.o}}%{!c:-o %d%w%u.o}\
- %{!pipe:%g.s} %A\n }"},
- {".s", "@assembler"},
- {"@assembler",
- ! "%{!S:as %{R} %{j} %{J} %{h} %{d2} %a %Y\
- %{c:%W{o*}%{!o*:-o %w%b.o}}%{!c:-o %d%w%u.o} %i %A\n }"},
- {".S", "@assembler-with-cpp"},
- {"@assembler-with-cpp",
- "cpp -lang-asm %{nostdinc*} %{C} %{v} %{A*} %{I*} %{P} %I\
- %{C:%{!E:%eGNU C does not support -C without using -E}}\
- --- 578,594 ----
- %{aux-info*}\
- %{pg:%{fomit-frame-pointer:%e-pg and -fomit-frame-pointer are incompatible}}\
- %{S:%W{o*}%{!o*:-o %b.s}}%{!S:-o %{|!pipe:%g.s}} |\n\
- ! %{!S:as %{v} %{R} %{j} %{J} %{h} %{d2} %a %Y\
- %{c:%W{o*}%{!o*:-o %w%b.o}}%{!c:-o %d%w%u.o}\
- %{!pipe:%g.s} %A\n }"},
- {".s", "@assembler"},
- {"@assembler",
- ! "%{!S:as %{v} %{R} %{j} %{J} %{h} %{d2} %a %Y\
- %{c:%W{o*}%{!o*:-o %w%b.o}}%{!c:-o %d%w%u.o} %i %A\n }"},
- {".S", "@assembler-with-cpp"},
- + {".ss", "@assembler-with-cpp"},
- + {".cpp", "@assembler-with-cpp"},
- + {".spp", "@assembler-with-cpp"},
- {"@assembler-with-cpp",
- "cpp -lang-asm %{nostdinc*} %{C} %{v} %{A*} %{I*} %{P} %I\
- %{C:%{!E:%eGNU C does not support -C without using -E}}\
- ***************
- *** 571,577 ****
- %{traditional-cpp:-traditional}\
- %{g*} %{W*} %{w} %{pedantic*} %{H} %{d*} %C %{D*} %{U*} %{i*}\
- %i %{!M:%{!MM:%{!E:%{!pipe:%g.s}}}}%{E:%W{o*}}%{M:%W{o*}}%{MM:%W{o*}} |\n",
- ! "%{!M:%{!MM:%{!E:%{!S:as %{R} %{j} %{J} %{h} %{d2} %a %Y\
- %{c:%W{o*}%{!o*:-o %w%b.o}}%{!c:-o %d%w%u.o}\
- %{!pipe:%g.s} %A\n }}}}"},
- {".ads", "@ada"},
- --- 598,604 ----
- %{traditional-cpp:-traditional}\
- %{g*} %{W*} %{w} %{pedantic*} %{H} %{d*} %C %{D*} %{U*} %{i*}\
- %i %{!M:%{!MM:%{!E:%{!pipe:%g.s}}}}%{E:%W{o*}}%{M:%W{o*}}%{MM:%W{o*}} |\n",
- ! "%{!M:%{!MM:%{!E:%{!S:as %{v} %{R} %{j} %{J} %{h} %{d2} %a %Y\
- %{c:%W{o*}%{!o*:-o %w%b.o}}%{!c:-o %d%w%u.o}\
- %{!pipe:%g.s} %A\n }}}}"},
- {".ads", "@ada"},
- ***************
- *** 597,602 ****
- --- 624,638 ----
-
- /* Here is the spec for running the linker, after compiling all files. */
-
- + #if (defined(CROSSATARI) || defined(atarist) || defined(atariminix))
- + static char *link_command_spec =
- + "%{!fsyntax-only: \
- + %{!c:%{!M:%{!MM:%{!E:%{!S:ld %l %X %{v} %{G} %{o*} \
- + %{A} %{d} %{e*} %{N} %{n} %{r} %{s} %{t} %{u*} %{x} %{z}\
- + %{!A:%{!nostartfiles:%{!nostdlib:%S}}} %{static:}\
- + %{L*} %{T*} %o %{!nostdlib:%L}\n }}}}}}";
- +
- + #else
- /* -u* was put back because both BSD and SysV seem to support it. */
- /* %{static:} simply prevents an error message if the target machine
- doesn't handle -static. */
- ***************
- *** 630,635 ****
- --- 666,672 ----
- %{L*} %D %{T*} %o %{!nostdlib:-lgcc %L -lgcc %{!A:%E}}\n }}}}}}";
- #endif
- #endif
- + #endif
-
- /* A vector of options to give to the linker.
- These options are accumulated by -Xlinker and -Wl,
- ***************
- *** 857,862 ****
- --- 894,900 ----
- *argcp = newindex;
- }
-
- + #if (!(defined(atarist) || defined(CROSSATARI) || defined(atariminix)))
- /* Read compilation specs from a file named FILENAME,
- replacing the default ones.
-
- ***************
- *** 996,1001 ****
- --- 1034,1040 ----
-
- return p;
- }
- + #endif /* ataris */
-
- /* Structure to keep track of the specs that have been defined so far. These
- are accessed using %(specname) or %[specname] in a compiler or link spec. */
- ***************
- *** 1112,1117 ****
- --- 1151,1163 ----
- /* Name with which this program was invoked. */
-
- static char *programname;
- +
- + #ifdef atarist
- + /* Flag indicating, that stderr should be redirected for the child
- + processes */
- +
- + unsigned char zflag;
- + #endif
-
- /* Structures to keep track of prefixes to try when looking for files. */
-
- ***************
- *** 1405,1414 ****
- if (base == (char *)0)
- base = "./";
-
- len = strlen (base);
- temp_filename = xmalloc (len + sizeof("/ccXXXXXX") + 1);
- strcpy (temp_filename, base);
- ! if (len > 0 && temp_filename[len-1] != '/')
- temp_filename[len++] = '/';
- strcpy (temp_filename + len, "ccXXXXXX");
-
- --- 1451,1471 ----
- if (base == (char *)0)
- base = "./";
-
- + #ifdef atarist
- + {
- + char *newbase = alloca(FILENAME_MAX);
- + dos2unx(base,newbase);
- + base = newbase;
- + }
- + #endif
- len = strlen (base);
- temp_filename = xmalloc (len + sizeof("/ccXXXXXX") + 1);
- strcpy (temp_filename, base);
- ! if (len > 0 && (temp_filename[len-1] != '/'
- ! #ifdef atarist
- ! || temp_filename[len-1] != '\\'
- ! #endif
- ! ))
- temp_filename[len++] = '/';
- strcpy (temp_filename + len, "ccXXXXXX");
-
- ***************
- *** 1427,1432 ****
- --- 1484,1490 ----
- use come from an obstack, we don't have to worry about allocating
- space for them. */
-
- + #if (!(defined(CROSSATARI) || defined(atarist)))
- #ifndef HAVE_PUTENV
-
- void
- ***************
- *** 1528,1533 ****
- --- 1586,1592 ----
- obstack_1grow (&collect_obstack, '\0');
- putenv (obstack_finish (&collect_obstack));
- }
- + #endif /* ataris */
-
-
- /* Search for NAME using the prefix list PREFIXES. MODE is passed to
- ***************
- *** 1812,1817 ****
- --- 1871,1877 ----
-
- #else /* not __MSDOS__ */
-
- + #ifndef atarist
- static int
- pexecute (search_flag, program, argv, not_last)
- int search_flag;
- ***************
- *** 1900,1905 ****
- --- 1960,1966 ----
- }
- }
-
- + #endif /* not atarist */
- #endif /* not __MSDOS__ */
- #else /* not OS2 */
-
- ***************
- *** 1930,1945 ****
- {
- char *prog; /* program name. */
- char **argv; /* vector of args. */
- int pid; /* pid of process for this command. */
- };
-
- struct command *commands; /* each command buffer with above info. */
-
- /* Count # of piped commands. */
- for (n_commands = 1, i = 0; i < argbuf_index; i++)
- if (strcmp (argbuf[i], "|") == 0)
- n_commands++;
- !
- /* Get storage for each command. */
- commands
- = (struct command *) alloca (n_commands * sizeof (struct command));
- --- 1991,2011 ----
- {
- char *prog; /* program name. */
- char **argv; /* vector of args. */
- + #ifndef atarist
- int pid; /* pid of process for this command. */
- + #endif
- };
-
- struct command *commands; /* each command buffer with above info. */
-
- + #ifndef atarist
- /* Count # of piped commands. */
- for (n_commands = 1, i = 0; i < argbuf_index; i++)
- if (strcmp (argbuf[i], "|") == 0)
- n_commands++;
- ! #else
- ! n_commands = 1;
- ! #endif
- /* Get storage for each command. */
- commands
- = (struct command *) alloca (n_commands * sizeof (struct command));
- ***************
- *** 1954,1959 ****
- --- 2020,2026 ----
- if (string)
- commands[0].argv[0] = string;
-
- + #ifndef atarist
- for (n_commands = 1, i = 0; i < argbuf_index; i++)
- if (strcmp (argbuf[i], "|") == 0)
- { /* each command. */
- ***************
- *** 1968,1973 ****
- --- 2035,2043 ----
- commands[n_commands].argv[0] = string;
- n_commands++;
- }
- + #else
- + n_commands = 1;
- + #endif
-
- argbuf[argbuf_index] = 0;
-
- ***************
- *** 1983,1991 ****
- --- 2053,2063 ----
- for (j = commands[i].argv; *j; j++)
- fprintf (stderr, " %s", *j);
-
- + #ifndef atarist
- /* Print a pipe symbol after all but the last command. */
- if (i + 1 != n_commands)
- fprintf (stderr, " |");
- + #endif
- fprintf (stderr, "\n");
- }
- fflush (stderr);
- ***************
- *** 2000,2016 ****
- --- 2072,2098 ----
- #endif /* DEBUG */
- }
-
- + #ifndef atarist
- /* Run each piped subprocess. */
-
- last_pipe_input = STDIN_FILE_NO;
- for (i = 0; i < n_commands; i++)
- {
- + #ifndef atariminix
- char *string = commands[i].argv[0];
-
- commands[i].pid = pexecute (string != commands[i].prog,
- string, commands[i].argv,
- i + 1 < n_commands);
-
- + #else
- + extern int execv();
- + char *string = commands[i].argv[0];
- +
- + commands[i].pid = pexecute (execv,
- + string, commands[i].argv,
- + i + 1 < n_commands);
- + #endif
- if (string != commands[i].prog)
- free (string);
- }
- ***************
- *** 2057,2062 ****
- --- 2139,2189 ----
- }
- return ret_code;
- }
- + #else /* atarist */
- + {
- + register int iii;
- + int errfd, oldfd;
- + char **j;
- +
- + execution_count++;
- +
- + if (zflag)
- + {
- + errfd = Fopen("compile.err", 2);
- + if (errfd < __SMALLEST_VALID_HANDLE)
- + errfd = Fcreate("compile.err", 0);
- + else
- + Fseek(0L, errfd, 2);
- + if (errfd >= __SMALLEST_VALID_HANDLE)
- + {
- + oldfd = Fdup (2);
- + Fforce(2, errfd);
- + }
- + else
- + {
- + error("cannot open %s", "compile.err");
- + zflag = 0; /* no redirection */
- + }
- + }
- + for (i = 0; i < n_commands ; i++)
- + {
- + j = commands[i].argv;
- + iii = spawnve(0, j[0], j, NULL);
- + if(iii != 0)
- + break;
- + }
- + if (zflag)
- + {
- + Fforce(2, oldfd);
- + Fclose(oldfd);
- + Fclose(errfd);
- + }
- + if (iii != 0)
- + return -1;
- + else
- + return 0;
- + }
- + #endif /* atarist */
- }
-
- /* Find all the switches given to us
- ***************
- *** 2120,2125 ****
- --- 2247,2253 ----
-
- /* Set up the default search paths. */
-
- + #ifndef CROSSATARI
- if (gcc_exec_prefix)
- {
- add_prefix (&exec_prefix, gcc_exec_prefix, 0, 0, NULL_PTR);
- ***************
- *** 2194,2199 ****
- --- 2322,2328 ----
- endp++;
- }
- }
- + #endif /* CROSSATARI */
-
- /* Use LPATH like LIBRARY_PATH (for the CMU build program). */
- temp = getenv ("LPATH");
- ***************
- *** 2402,2407 ****
- --- 2531,2542 ----
- n_switches++;
- break;
- }
- + #ifdef atarist
- + case 'z': /* redirect stderr to a file */
- + zflag++;
- + n_switches++;
- + break;
- + #endif
- default:
- n_switches++;
-
- ***************
- *** 2421,2431 ****
- --- 2556,2577 ----
- (such as cpp) rather than those of the host system. */
- /* Use 2 as fourth arg meaning try just the machine as a suffix,
- as well as trying the machine and the version. */
- + #if (defined(atarist) || defined(CROSSATARI) || defined(WEIRD))
- + /* NB defined(WEIRD) should not really be there, its only for my weird setup */
- + /* We are not using machine_suffix here, so do not make */
- + /* these prefixes available only when we have one */
- + add_prefix (&exec_prefix, standard_exec_prefix, 0, 0, NULL_PTR);
- + add_prefix (&exec_prefix, standard_exec_prefix_1, 0, 0, NULL_PTR);
- +
- + add_prefix (&startfile_prefix, standard_exec_prefix, 0, 0, NULL_PTR);
- + add_prefix (&startfile_prefix, standard_exec_prefix_1, 0, 0, NULL_PTR);
- + #else
- add_prefix (&exec_prefix, standard_exec_prefix, 0, 2, NULL_PTR);
- add_prefix (&exec_prefix, standard_exec_prefix_1, 0, 2, NULL_PTR);
-
- add_prefix (&startfile_prefix, standard_exec_prefix, 0, 1, NULL_PTR);
- add_prefix (&startfile_prefix, standard_exec_prefix_1, 0, 1, NULL_PTR);
- + #endif /* (defined(atarist) || defined(CROSSATARI)) */
-
- tooldir_prefix = concat (tooldir_base_prefix, spec_machine, "/");
-
- ***************
- *** 2667,2674 ****
- --- 2813,2822 ----
- If -pipe, this forces out the last command if it ended in `|'. */
- if (value == 0)
- {
- + #ifndef atarist
- if (argbuf_index > 0 && !strcmp (argbuf[argbuf_index - 1], "|"))
- argbuf_index--;
- + #endif
-
- if (argbuf_index > 0)
- value = execute ();
- ***************
- *** 2706,2711 ****
- --- 2854,2903 ----
- Otherwise, NL, SPC, TAB and % are special. */
- switch (inswitch ? 'a' : c)
- {
- + #if (defined(atarist) || defined(CROSSATARI))
- + /* this stuff added by jrd. if see '$', expect name of env var, delimited
- + by '$'. Find it's value, and subst it in.
- +
- + modified by ERS to only collect things that look like names; this
- + saves e.g. the -$ arg. to cpp from getting munged */
- +
- + case '$':
- + {
- + char varname[32]; /* should be enough */
- + char * value; /* deciphered value string */
- + char *temp;
- + int i;
- + extern char *getenv();
- +
- + for (i = 0 ; ((c = *p) != '$') && isalnum(c) && i < 31 ; i++, p++)
- + varname[i] = c;
- + varname[i] = '\0';
- + if (i > 0) /* ++jrb fix */
- + {
- + ++p; /* skip trailing '$' */
- + value = getenv(varname); /* ++jrb fix */
- + if (value)
- + { /* if value is a path, only consider 1'st component */
- + #ifdef atarist
- + if((temp = index(value, ',')) == NULL)
- + temp = index(value, ';');
- + #else
- + temp = index(value, ':');
- + #endif
- + obstack_grow (&obstack, value,
- + temp ? temp - value : strlen (value));
- + }
- + else
- + obstack_1grow (&obstack, '.'); /* a complete kludge... */
- + }
- + else
- + {
- + obstack_1grow(&obstack, '$');
- + }
- + arg_going = 1;
- + }
- + break;
- + #endif /* atarist */
- case '\n':
- /* End of line: finish any pending argument,
- then run the pending command if one has been started. */
- ***************
- *** 3380,3392 ****
- --- 3572,3592 ----
- break;
-
- default:
- + #if 1 /* atarist */
- + fprintf(stderr, "Bogus char '%c' found at pos %d of spec '%s'\n",
- + c, (p - spec - 1), spec);
- + #endif
- abort ();
- }
- break;
-
- + #ifndef atarist
- + /* on the atari it is important to preserve backslash in spec */
- + /* so just let it go into default case */
- case '\\':
- /* Backslash: treat next character as ordinary. */
- c = *p++;
- + #endif
-
- /* fall through */
- default:
- ***************
- *** 3663,3668 ****
- --- 3863,3869 ----
-
- /* On fatal signals, delete all the temporary files. */
-
- + #ifndef atarist
- static void
- fatal_error (signum)
- int signum;
- ***************
- *** 3674,3679 ****
- --- 3875,3881 ----
- so its normal effect occurs. */
- kill (getpid (), signum);
- }
- + #endif
-
- int
- main (argc, argv)
- ***************
- *** 3688,3693 ****
- --- 3890,3900 ----
- char *specs_file;
- char *p;
-
- + #ifdef atarist
- + /* turn this on if you are going to set the TOS 1.4 dont clear heap flag */
- + /* _malloczero(1); */ /* zero mallocs by default */
- + programname = "gcc";
- + #else
- p = argv[0] + strlen (argv[0]);
- while (p != argv[0] && p[-1] != '/') --p;
- programname = p;
- ***************
- *** 3704,3715 ****
- --- 3911,3924 ----
- if (signal (SIGPIPE, SIG_IGN) != SIG_IGN)
- signal (SIGPIPE, fatal_error);
- #endif
- + #endif /* atarist */
-
- argbuf_length = 10;
- argbuf = (char **) xmalloc (argbuf_length * sizeof (char *));
-
- obstack_init (&obstack);
-
- + #if (!(defined(atarist) || defined(CROSSATARI)))
- /* Set up to remember the pathname of gcc and any options
- needed for collect. We use argv[0] instead of programname because
- we need the complete pathname. */
- ***************
- *** 3717,3722 ****
- --- 3926,3932 ----
- obstack_grow (&collect_obstack, "COLLECT_GCC=", sizeof ("COLLECT_GCC=")-1);
- obstack_grow (&collect_obstack, argv[0], strlen (argv[0])+1);
- putenv (obstack_finish (&collect_obstack));
- + #endif
-
- /* Choose directory for temp files. */
-
- ***************
- *** 3728,3733 ****
- --- 3938,3952 ----
-
- process_command (argc, argv);
-
- + #if (defined(atarist) || defined(CROSSATARI))
- + {
- + char *temp;
- +
- + if((temp = getenv ("GCCEXEC")))
- + add_prefix (&exec_prefix, temp, 0, 0, 0);
- + }
- + #endif
- +
- /* Initialize the vector of specs to just the default.
- This means one element containing 0s, as a terminator. */
-
- ***************
- *** 3735,3740 ****
- --- 3954,3963 ----
- bcopy (default_compilers, compilers, sizeof default_compilers);
- n_compilers = n_default_compilers;
-
- +
- + #if (defined(atarist) || defined(CROSSATARI) || defined(atariminix))
- + specs_file = 0;
- + #else
- /* Read specs from a file if there is one. */
-
- machine_suffix = concat (spec_machine, "/", concat (spec_version, "/", ""));
- ***************
- *** 3744,3749 ****
- --- 3967,3973 ----
- /* Read the specs file unless it is a default one. */
- if (specs_file != 0 && strcmp (specs_file, "specs"))
- read_specs (specs_file);
- + #endif
-
- /* If not cross-compiling, look for startfiles in the standard places. */
- /* The fact that these are done here, after reading the specs file,
- ***************
- *** 3781,3787 ****
- 0, 0, NULL_PTR);
- add_prefix (&startfile_prefix,
- concat (standard_exec_prefix,
- ! machine_suffix,
- standard_startfile_prefix),
- 0, 0, NULL_PTR);
- }
- --- 4005,4011 ----
- 0, 0, NULL_PTR);
- add_prefix (&startfile_prefix,
- concat (standard_exec_prefix,
- ! (machine_suffix)? machine_suffix : "",
- standard_startfile_prefix),
- 0, 0, NULL_PTR);
- }
- ***************
- *** 3816,3822 ****
- --- 4040,4052 ----
-
- if (verbose_flag)
- {
- + #if (defined(atarist) || defined(CROSSATARI) || defined(atariminix))
- + #include "PatchLev.h"
- + fprintf (stderr, "gcc-atariST version %s Patchlevel %s\n",
- + version_string, PatchLevel);
- + #else
- fprintf (stderr, "gcc version %s\n", version_string);
- + #endif
- if (n_infiles == 0)
- exit (0);
- }
- ***************
- *** 3864,3870 ****
- --- 4094,4105 ----
-
- input_basename = input_filename;
- for (p = input_filename; *p; p++)
- + #ifdef atarist
- + if (((*p == '/') || (*p == '\\')) && (*(p-1) != ':'))
- + /* allow both '\' and '/' with our new lib */
- + #else
- if (*p == '/')
- + #endif
- input_basename = p + 1;
-
- /* Find a suffix starting with the last period,
- ***************
- *** 3927,3932 ****
- --- 4162,4168 ----
- int i;
- int first_time;
-
- + #if (!(defined(atarist) || defined(CROSSATARI)))
- /* Rebuild the COMPILER_PATH and LIBRARY_PATH environment variables
- for collect. */
- putenv_from_prefixes (&exec_prefix, "COMPILER_PATH=");
- ***************
- *** 3957,3962 ****
- --- 4193,4199 ----
- }
- obstack_grow (&collect_obstack, "\0", 1);
- putenv (obstack_finish (&collect_obstack));
- + #endif
-
- value = do_spec (link_command_spec);
- if (value < 0)
- *** gcc-2.5.0/getpwd.c Tue Sep 21 17:35:41 1993
- --- /net/acae127/home/bammi/usr2/gcc/getpwd.c Fri May 21 08:35:37 1993
- ***************
- *** 14,20 ****
- BSD systems) now provides getcwd as called for by POSIX. Allow for
- the few exceptions to the general rule here. */
-
- ! #if !(defined (POSIX) || defined (USG) || defined (VMS))
- #include <sys/param.h>
- extern char *getwd ();
- #define getcwd(buf,len) getwd(buf)
- --- 14,20 ----
- BSD systems) now provides getcwd as called for by POSIX. Allow for
- the few exceptions to the general rule here. */
-
- ! #if !(defined (POSIX) || defined (USG) || defined (VMS) || defined(atarist) || defined(CROSSHPUX))
- #include <sys/param.h>
- extern char *getwd ();
- #define getcwd(buf,len) getwd(buf)
- ***************
- *** 48,58 ****
- if (!p && !(errno = failure_errno))
- {
- if (! ((p = getenv ("PWD")) != 0
- && *p == '/'
- && stat (p, &pwdstat) == 0
- && stat (".", &dotstat) == 0
- && dotstat.st_ino == pwdstat.st_ino
- ! && dotstat.st_dev == pwdstat.st_dev))
-
- /* The shortcut didn't work. Try the slow, ``sure'' way. */
- for (s = GUESSPATHLEN; ! getcwd (p = xmalloc (s), s); s *= 2)
- --- 48,61 ----
- if (!p && !(errno = failure_errno))
- {
- if (! ((p = getenv ("PWD")) != 0
- + #ifndef atarist
- && *p == '/'
- && stat (p, &pwdstat) == 0
- && stat (".", &dotstat) == 0
- && dotstat.st_ino == pwdstat.st_ino
- ! && dotstat.st_dev == pwdstat.st_dev
- ! #endif
- ! ))
-
- /* The shortcut didn't work. Try the slow, ``sure'' way. */
- for (s = GUESSPATHLEN; ! getcwd (p = xmalloc (s), s); s *= 2)
- *** gcc-2.5.0/toplev.c Mon Nov 1 13:14:32 1993
- --- /net/acae127/home/bammi/usr2/gcc/toplev.c Thu Nov 4 11:41:41 1993
- ***************
- *** 31,37 ****
-
- #include <sys/stat.h>
-
- ! #ifdef USG
- #undef FLOAT
- #include <sys/param.h>
- /* This is for hpux. It is a real screw. They should change hpux. */
- --- 31,37 ----
-
- #include <sys/stat.h>
-
- ! #if defined(USG) || defined(CROSSHPUX)
- #undef FLOAT
- #include <sys/param.h>
- /* This is for hpux. It is a real screw. They should change hpux. */
- ***************
- *** 41,49 ****
- --- 41,57 ----
- #undef FFS /* Some systems define this in param.h. */
- #else
- #ifndef VMS
- + #if (!(defined(atarist) || defined(atariminix)))
- #include <sys/time.h>
- #include <sys/resource.h>
- + #endif /* !(atarist || atariminix) */
- + #endif
- #endif
- +
- + #ifdef atariminix
- + #include <sys/times.h>
- + /* #include <minix/const.h>, avoid dragging this in */
- + #define HZ 60 /* this is the only thing needed from minix/const.h */
- #endif
-
- #include "input.h"
- ***************
- *** 61,66 ****
- --- 69,79 ----
- #include "bytecode.h"
- #include "bc-emit.h"
-
- + #ifdef atarist
- + long _stksize = -1L; /* for all sizes of ST's */
- + /* -1 means malloc from own heap and keep all of memory */
- + #endif /* atarist */
- +
- #ifdef VMS
- /* The extra parameters substantially improve the I/O performance. */
- static FILE *
- ***************
- *** 792,798 ****
- int
- get_run_time ()
- {
- ! #ifdef USG
- struct tms tms;
- #else
- #ifndef VMS
- --- 805,814 ----
- int
- get_run_time ()
- {
- ! #ifdef atarist
- ! long now;
- ! #else
- ! #if (defined(USG) || defined(atariminix) || defined(CROSSHPUX))
- struct tms tms;
- #else
- #ifndef VMS
- ***************
- *** 807,817 ****
- } vms_times;
- #endif
- #endif
-
- if (quiet_flag)
- return 0;
-
- ! #ifdef USG
- times (&tms);
- return (tms.tms_utime + tms.tms_stime) * (1000000 / HZ);
- #else
- --- 823,837 ----
- } vms_times;
- #endif
- #endif
- + #endif
-
- if (quiet_flag)
- return 0;
-
- ! #ifdef atarist
- ! return(time(NULL) * 1000000);
- ! #else
- ! #if (defined(USG) || defined(atariminix) || defined(CROSSHPUX))
- times (&tms);
- return (tms.tms_utime + tms.tms_stime) * (1000000 / HZ);
- #else
- ***************
- *** 824,829 ****
- --- 844,850 ----
- return (vms_times.proc_user_time + vms_times.proc_system_time) * 10000;
- #endif
- #endif
- + #endif
- }
-
- #define TIMEVAR(VAR, BODY) \
- ***************
- *** 1461,1466 ****
- --- 1482,1488 ----
- longjmp (float_handler, 1);
- }
-
- + #ifndef atarist
- /* Handler for SIGPIPE. */
-
- static void
- ***************
- *** 1470,1475 ****
- --- 1492,1498 ----
- {
- fatal ("output pipe has been closed");
- }
- + #endif
-
- /* Strip off a legitimate source ending from the input string NAME of
- length LEN. */
- ***************
- *** 1523,1528 ****
- --- 1546,1552 ----
- putc ('\"', asm_file);
- }
-
- + #ifdef SYSV
- /* Output a file name in the form wanted by System V. */
-
- void
- ***************
- *** 1553,1558 ****
- --- 1577,1583 ----
- #endif
- #endif
- }
- + #endif
-
- /* Routine to build language identifier for object file. */
- static void
- ***************
- *** 1665,1671 ****
- --- 1690,1700 ----
- {
- register char *dumpname = (char *) xmalloc (dump_base_name_length + 6);
- strcpy (dumpname, dump_base_name);
- + #ifndef atarist
- strcat (dumpname, ".jump");
- + #else
- + strcat (dumpname, ".jmp");
- + #endif
- jump_opt_dump_file = fopen (dumpname, "w");
- if (jump_opt_dump_file == 0)
- pfatal_with_name (dumpname);
- ***************
- *** 1687,1693 ****
- --- 1716,1726 ----
- {
- register char *dumpname = (char *) xmalloc (dump_base_name_length + 6);
- strcpy (dumpname, dump_base_name);
- + #ifndef atarist
- strcat (dumpname, ".loop");
- + #else
- + strcat (dumpname, ".lop");
- + #endif
- loop_dump_file = fopen (dumpname, "w");
- if (loop_dump_file == 0)
- pfatal_with_name (dumpname);
- ***************
- *** 1698,1704 ****
- --- 1731,1741 ----
- {
- register char *dumpname = (char *) xmalloc (dump_base_name_length + 6);
- strcpy (dumpname, dump_base_name);
- + #ifndef atarist
- strcat (dumpname, ".cse2");
- + #else
- + strcat (dumpname, ".cs2");
- + #endif
- cse2_dump_file = fopen (dumpname, "w");
- if (cse2_dump_file == 0)
- pfatal_with_name (dumpname);
- ***************
- *** 1709,1715 ****
- --- 1746,1756 ----
- {
- register char *dumpname = (char *) xmalloc (dump_base_name_length + 6);
- strcpy (dumpname, dump_base_name);
- + #ifndef atarist
- strcat (dumpname, ".flow");
- + #else
- + strcat (dumpname, ".flo");
- + #endif
- flow_dump_file = fopen (dumpname, "w");
- if (flow_dump_file == 0)
- pfatal_with_name (dumpname);
- ***************
- *** 1720,1726 ****
- --- 1761,1771 ----
- {
- register char *dumpname = (char *) xmalloc (dump_base_name_length + 10);
- strcpy (dumpname, dump_base_name);
- + #ifndef atarist
- strcat (dumpname, ".combine");
- + #else
- + strcat (dumpname, ".cmb");
- + #endif
- combine_dump_file = fopen (dumpname, "w");
- if (combine_dump_file == 0)
- pfatal_with_name (dumpname);
- ***************
- *** 1731,1737 ****
- --- 1776,1786 ----
- {
- register char *dumpname = (char *) xmalloc (dump_base_name_length + 7);
- strcpy (dumpname, dump_base_name);
- + #ifndef atarist
- strcat (dumpname, ".sched");
- + #else
- + strcat (dumpname, ".sch");
- + #endif
- sched_dump_file = fopen (dumpname, "w");
- if (sched_dump_file == 0)
- pfatal_with_name (dumpname);
- ***************
- *** 1742,1748 ****
- --- 1791,1801 ----
- {
- register char *dumpname = (char *) xmalloc (dump_base_name_length + 6);
- strcpy (dumpname, dump_base_name);
- + #ifndef atarist
- strcat (dumpname, ".lreg");
- + #else
- + strcat (dumpname, ".lrg");
- + #endif
- local_reg_dump_file = fopen (dumpname, "w");
- if (local_reg_dump_file == 0)
- pfatal_with_name (dumpname);
- ***************
- *** 1753,1759 ****
- --- 1806,1816 ----
- {
- register char *dumpname = (char *) xmalloc (dump_base_name_length + 6);
- strcpy (dumpname, dump_base_name);
- + #ifndef atarist
- strcat (dumpname, ".greg");
- + #else
- + strcat (dumpname, ".grg");
- + #endif
- global_reg_dump_file = fopen (dumpname, "w");
- if (global_reg_dump_file == 0)
- pfatal_with_name (dumpname);
- ***************
- *** 1764,1770 ****
- --- 1821,1831 ----
- {
- register char *dumpname = (char *) xmalloc (dump_base_name_length + 8);
- strcpy (dumpname, dump_base_name);
- + #ifndef atarist
- strcat (dumpname, ".sched2");
- + #else
- + strcat (dumpname, ".sc2");
- + #endif
- sched2_dump_file = fopen (dumpname, "w");
- if (sched2_dump_file == 0)
- pfatal_with_name (dumpname);
- ***************
- *** 1775,1781 ****
- --- 1836,1846 ----
- {
- register char *dumpname = (char *) xmalloc (dump_base_name_length + 7);
- strcpy (dumpname, dump_base_name);
- + #ifndef atarist
- strcat (dumpname, ".jump2");
- + #else
- + strcat (dumpname, ".jp2");
- + #endif
- jump2_opt_dump_file = fopen (dumpname, "w");
- if (jump2_opt_dump_file == 0)
- pfatal_with_name (dumpname);
- ***************
- *** 1799,1805 ****
- --- 1864,1874 ----
- {
- register char *dumpname = (char *) xmalloc (dump_base_name_length + 10);
- strcpy (dumpname, dump_base_name);
- + #ifndef atarist
- strcat (dumpname, ".stack");
- + #else
- + strcat (dumpname, ".stk");
- + #endif
- stack_reg_dump_file = fopen (dumpname, "w");
- if (stack_reg_dump_file == 0)
- pfatal_with_name (dumpname);
- ***************
- *** 2926,2937 ****
- --- 2995,3016 ----
- int version_flag = 0;
- char *p;
-
- + #ifdef atarist
- + /* turn this on if you are going to set the TOS 1.4 dont clear heap flag */
- + /* _malloczero(1); */ /* zero mallocs by default */
- + #endif
- +
- /* save in case md file wants to emit args as a comment. */
- save_argc = argc;
- save_argv = argv;
-
- p = argv[0] + strlen (argv[0]);
- + #ifndef atarist
- while (p != argv[0] && p[-1] != '/') --p;
- + #else
- + while (p != argv[0] && ((p[-1] != '/') && (p[-1] != '\\') &&
- + (p[-1] != ':'))) --p;
- + #endif
- progname = p;
-
- #ifdef RLIMIT_STACK
- ***************
- *** 2948,2956 ****
- --- 3027,3037 ----
-
- signal (SIGFPE, float_signal);
-
- + #ifndef atarist
- #ifdef SIGPIPE
- signal (SIGPIPE, pipe_closed);
- #endif
- + #endif
-
- decl_printable_name = decl_name;
- lang_expand_expr = (struct rtx_def *(*)()) do_abort;
- ***************
- *** 3049,3054 ****
- --- 3130,3147 ----
- else if (!strcmp (str, "dumpbase"))
- {
- dump_base_name = argv[++i];
- + #ifdef atarist
- + /* dump_base_name will typically be 'foo.c' here.
- + Need to truncate at the '.', cause dots mean
- + something here
- + */
- + {
- + char * n = dump_base_name;
- + for ( ; ((*n) && (*n != '.')) ; )
- + n++;
- + *n = '\0';
- + }
- + #endif
- }
- else if (str[0] == 'd')
- {
- ***************
- *** 3480,3486 ****
- --- 3573,3585 ----
- option flags in use. */
- if (version_flag)
- {
- + #if (defined(atarist) || defined(CROSSATARI) || defined(atariminix))
- + #include "PatchLev.h"
- + fprintf (stderr, "%s version %s-atariST Patchlevel %s",
- + language_string, version_string, PatchLevel);
- + #else
- fprintf (stderr, "%s version %s", language_string, version_string);
- + #endif
- #ifdef TARGET_VERSION
- TARGET_VERSION;
- #endif
- ***************
- *** 3505,3510 ****
- --- 3604,3611 ----
- if (output_bytecode)
- bc_write_file (stdout);
-
- + #if (!(defined(atarist) || defined(atariminix)))
- + #if (!(defined(CROSSHPUX)))
- #ifndef OS2
- #ifndef VMS
- if (flag_print_mem)
- ***************
- *** 3523,3528 ****
- --- 3624,3631 ----
- }
- #endif /* not VMS */
- #endif /* not OS2 */
- + #endif
- + #endif
-
- if (errorcount)
- exit (FATAL_EXIT_CODE);
- ***************
- *** 3634,3636 ****
- --- 3737,3758 ----
-
- fprintf (stderr, "\n");
- }
- +
- + #ifdef atarist
- + #include <string.h>
- +
- + char *atari_filename_nondirectory(p)
- + char *p;
- + {
- + char *s;
- +
- + for(s = p + strlen(p); s != p; --s)
- + {
- + if((*s == '/') || (*s == '\\'))
- + break;
- + }
- +
- + return (s == p) ? p : s+1;
- + }
- +
- + #endif
- diff -rc gcc-2.5.0/varasm.c /net/acae127/home/bammi/usr2/gcc/varasm.c
- *** gcc-2.5.0/varasm.c Mon Nov 15 11:08:16 1993
- --- /net/acae127/home/bammi/usr2/gcc/varasm.c Mon Nov 15 14:50:30 1993
- ***************
- *** 2831,2836 ****
- --- 2831,2839 ----
- {
- struct rtx_const val0, val1;
-
- + if (XEXP (x, 0) == pc_rtx || XEXP (x, 1) == pc_rtx)
- + return XEXP (x, 0) == XEXP (x, 1) ? const0_rtx : x;
- +
- decode_rtx_const (GET_MODE (x), XEXP (x, 0), &val0);
- decode_rtx_const (GET_MODE (x), XEXP (x, 1), &val1);
-
-